/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.tools;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author Austin
 */
public class TimeFormat {

    public String getTime() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");//设置日期格式
        return df.format(new Date());
    }
    public String getDay() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy_MM_dd");//设置日期格式
        return df.format(new Date());
    }
    public static void main(String[] args) {
//        System.out.println(getDay());
    }
}
